// cnpm i http-proxy-middleware
// cnpm i connect-history-api-fallback
const express = require("express");
const {createProxyMiddleware} = require("http-proxy-middleware");
const history = require("connect-history-api-fallback");
const app = express();
app.use(history());
app.use(express.static(__dirname));
app.use("/bang",createProxyMiddleware({
	target:"http://zhangpeiyue.com:9092",
	changeOrigin:true,
	pathRewrite:{
		"^/bang":""
	}
}))
app.listen(8081,()=>{
	console.log("success");
})